<template>
  <div id="app">
    <nav class="fixed">
      <router-link to="/">Home</router-link> |
      <router-link to="/about">About</router-link>|
      <router-link to="/list">List</router-link>|
      <router-link to="/mine">我的</router-link>|
      <router-link to="/order">订单</router-link>|
      <router-link to="/pay">结算</router-link>|
      <router-link to="/test1">第一个页面</router-link>|
      <router-link to="/test2">第二个页面</router-link>|
      <router-link to="/user">用户管理</router-link>|
    </nav>
    <transition name="box">
      <router-view />
    </transition>
    <router-view class="view two" name="a"></router-view>
    <router-view class="view three" name="b"></router-view>
  </div>
</template>

<style>

.box-enter-active,
.box-leave-active {
  transition: opacity 0.5s;
  background-color: red;
}
.box-enter, .box-leave-to /* .fade-leave-active below version 2.1.8 */ {
  opacity: 0;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

nav {
  padding: 30px;
}

nav a {
  font-weight: bold;
  color: #2c3e50;
}

nav a.router-link-exact-active {
  color: #42b983;
}
</style>
